<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'document.label', default: 'document')}"/>
    <title>编辑帮助文档</title>
    <style>
    .note-editor {
        margin-left: 16.66666667%;
    }

    .note-editor {
        border: none;
        padding-top: 7px;
    }
    </style>
</head>

<body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>编辑帮助文档</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link controller="document" action="index">帮助文档列表</g:link>
                    </li>
                    <li class="breadcrumb-item">编辑帮助文档</li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">

            <div class="card">
                <div class="card-header">
                    <h5>帮助文档信息详情</h5>

                    <div class="card-header-right">
                        <g:link action="edit" resource="${this.document}" data-toggle="tooltip"
                                data-placement="top" title="" data-original-title="编辑">
                            <i class="icofont icofont-edit"></i>
                        </g:link>

                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>
                <div class="card-block">
                    <div class="form-group row">
                        <label class="col-md-2 control-label">标题：</label>

                        <div class="col-md-3">
                            <span class="cont">${this.document?.title}</span>
                        </div>
                        <label class="col-md-2 control-label">是否使用：</label>

                        <div class="col-md-3">
                            <span class="cont">${this.document?.active}</span>

                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">创建时间：</label>

                        <div class="col-md-3">
                            <span class="cont"><g:formatDate date="${this.document?.createdDate}"
                                                             format="yyyy-MM-dd HH:mm:ss"></g:formatDate></span>

                        </div>
                        <label class="col-md-2 control-label">修改时间：</label>

                        <div class="col-md-3">
                            <span class="cont"><g:formatDate date="${this.document?.modifiedDate}"
                                                             format="yyyy-MM-dd HH:mm:ss"></g:formatDate></span>
                        </div>

                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <g:field name="document" id="document"
                                 value="${this.document?.document}"
                                 type="hidden"/>
                        <label class="col-md-2 control-label">帮助文档：</label>

                        <div class="col-md-8" id="summernote">
                            ${this.document?.document}
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        var text = $("#document").val();
        $('#summernote').summernote({
            airMode: true,
        }).summernote('code', text);

    })
</script>
</body>

</html>


